<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>华猫商城</title>
		<style></style>
		<link href="../css/jquery.validator.css" rel="stylesheet">
		<link href="../css/common.css" rel="stylesheet">

		<link href="../plugin/userLib/css/user.css" rel="stylesheet">
		<link href="../plugin/userLib/css/userinfo.css" rel="stylesheet">
		<link href="../plugin/userLib/css/link.css" rel="stylesheet">
		<link href="../css/base.css" rel="stylesheet">
		<style>

		</style>
	</head>

	<body>
		<div id="header"></div>
		<div id="headerBox"></div>
		<!--<div id="nav_menu"></div>-->
		<div class="ZZHT-wrap">
			<div class="ZZHT-header" style="border-bottom: 1px solid #ffffff;">
				<div class="ZZHT-shop-nav">
					<div class="ZZHT-nav-box">
						<a href="#">
							<li class="liselect ZZHT-lfloat ZZHT-nav-boxa">用户中心</li>
						</a>
						<div class="ZZHT-clear"></div>
					</div>
				</div>
				<div class="ZZHT-clear"></div>
			</div>
			<div class="ZZHT-main">
				<div id="user_left"></div>
				<div class="ZZHT-content">
					<div class="ZZHT-user-head clearfix"><span class="left fl">我的分享</span><span class="right fr">当前位置：我的分享--分享链接</span></div>
					<div class="links-wrap">
						<!--<div class="advertising clearfix"><i class="icon-advertise"></i><span id="message">我的已分享成功0个用户（其中0个主管，0个经理,0个代理）,获得分享现金￥：0元,获得分润积分：0个</span>
							<a href="javascript:;" class="btn-closed fr" id="J_closed"><i class="icon-closed"></i></a>
						</div>-->
						<div class="way-one clearfix">
							<span class="fl">邀请方式一：</span>
							<div class="fl">
								<span id="payQr" width="400" height="400"><img src="" width="130" height="130"></span>
								<p>请被邀请人扫描屏幕上的二维码</p>
							</div>
						</div>
						<div class="way-two clearfix">
							<span class="fl">邀请方式二：</span>
							<div class="fl">
								<div><input type="text" id="url" value="http://www.baidu.com">
									<a id="J_copy">复制链接</a>
								</div>
								<p>复制上方地址发送给您的朋友</p>
							</div>
						</div>
					</div>

				</div>
			</div>
			<div style="clear:both;"></div>
			<br>
		</div>
		<div id="ck3"></div>
		<script src="../js/jquery.min.js"></script>
		<script src="../plugin/layer/layer.js"></script>
		<script type="text/javascript" src="../js/ljf_base.js"></script>
		<script type="text/javascript" src="../js/common.js"></script>
		<script type="text/javascript" src="../js/common_view.js"></script>
		<script type="text/javascript" src="../plugin/userLib/js/share.js"></script>
		<script type="text/javascript">
			$.ajax({//获取用户信息 头像等
				type: "get",
				url: SURL + "users/selectByUsersInfo",
				data: {
					"userId":localStorage.userId,
				},
				dataType: 'json',
				success: function(res) {
					console.log(res);
					if(res.messageCode==200){
						let userPhone = res.entity.userPhone;
						var url = window.location.href.split('/')[0]+"//"+window.location.href.split('/')[2]+"/"+window.location.href.split('/')[3]+"/view/register.html?userPhone="+userPhone;
						$('#url').val(url);
						$(function() {
							//二维码
							//参数1表示图像大小，取值范围1-10；参数2表示质量，取值范围'L','M','Q','H'
							var a = qrcode(8, 'M');
							a.addData(url);
							a.make();
							$('#payQr').html(a.createImgTag());
						});
						
					}else{
						layer.msg(res.message);
					}
					
				}
			});
		</script>
	</body>

</html>